<?php
use think\facade\Route;

//字典管理
Route::group('api/dictionary', function () {
    Route::get('/', 'Dictionary/index');
    Route::post('/', 'Dictionary/save');
    Route::put('/:id', 'Dictionary/update');
    Route::delete('/:id', 'Dictionary/delete');
    Route::get('/items', 'DictionaryData/index');
    Route::post('/items', 'DictionaryData/save');
    Route::put('/items/:id', 'DictionaryData/update');
    Route::delete('/items/:id', 'DictionaryData/delete');
});
Route::group('api/dictionary_data', function () {
    Route::get('/', 'DictionaryData/index');
    Route::post('/', 'DictionaryData/save');
    Route::put('/:id', 'DictionaryData/update');
    Route::delete('/:id', 'DictionaryData/delete');
});
//企业管理
Route::group('api/enterprise',function(){
    Route::get('/', 'Enterprise/index');
    Route::post('/', 'Enterprise/save');
    Route::put('/:id', 'Enterprise/update');
    Route::delete('/:id', 'Enterprise/delete');
    Route::get('/search', 'Enterprise/search');
    Route::post('/invite', 'Enterprise/invite');
});
//角色管理
Route::group('api/role',function(){
    Route::get('/', 'Role/index');
    Route::get('/detail', 'Role/detail');
    Route::post('/', 'Role/save');
    Route::put('/', 'Role/update');
    Route::delete('/:id', 'Role/delete');
});
//权限管理
Route::group('api/permission',function(){
    Route::get('/', 'Permission/index');
    Route::post('/', 'Permission/save');
    Route::get('/keys', 'Permission/keys');
    Route::put('/', 'Permission/update');
    Route::delete('/:id', 'Permission/delete');
});